import './index.scss'
/**
 * 创建新组件之后，在all-can-use-components中添加
 * 必须应用 microCreateMinis
 * 数据必须以formData包含
 * */
import { microCreateMinis } from '../../minis'

/** 头部配置*/
export default {
  name: 'nav-icons-components',
  mixins: [microCreateMinis],
  props: {},
  data() {
    return {
      formData: {
        iconType: '0',
        iconsList: [
          {
            nav_image: 'https://shopncstaticimage.baiyangwang.com/mobile/navigation/06711191687899445.jpg',
            nav_title: '新人专享'
          },
          {
            nav_image: 'https://shopncstaticimage.baiyangwang.com/mobile/navigation/06711191687899445.jpg',
            nav_title: '营养保健'
          },
          {
            nav_image: 'https://shopncstaticimage.baiyangwang.com/mobile/navigation/06711191687899445.jpg',
            nav_title: '美妆个护'
          },
          {
            nav_image: 'https://shopncstaticimage.baiyangwang.com/mobile/navigation/06711191687899445.jpg',
            nav_title: '母婴用品'
          },
          {
            nav_image: 'https://shopncstaticimage.baiyangwang.com/mobile/navigation/06711191687899445.jpg',
            nav_title: '测试数据'
          }
        ]
      },
      id: '',
      commonCheckFieldRules: 'checkData', // 当前组件默认的规则判断函数
      mySelfCheckRules: 'mySelfCheckFun'// 我自己的验证规则函数  比如弹窗之类的
    }
  },
  watch: {
  },
  components: {},
  computed: {
  },
  mounted() {},
  methods: {
    resetBoderColor() {
      this.formData.checkBorderColor = '#dedede'
    },
    // 点击tab
    handleClick(index) {
      this.activeIndex = index
    },
    /**
     * 开始验证
     * */
    checkData() {
      this.myCheckResult((this.formData.title !== ''))
    },
    /** 弹窗*/
    mySelfCheckFun() { // 可以选择调用默认规则判断
      this.showCheckForm()
      this.$message.error('请填写完整信息')
    }

  }
}
